<script setup>
import { reactive, ref, watch } from "vue";
import { timestampToTime } from "@/public/public";
import { loginApi } from "@/api/user";
const props = defineProps({ dialogFormDetails: {}, rowData: {} });
const emits = defineEmits(["isShow"]);

const userData = ref({});
watch(
  () => props.rowData,
  (o, n) => {
    userData.value = props.rowData;
  }
);

const dFDetails = ref(props.dialogFormDetails);
function close() {
  emits("isShow", false);
}
function submit() {}
function cancel() {
  close();
}
</script>

<template>
  <div class="big_table">
    <p class="line-one">任务详情</p>
    <p>申请标题: {{ userData.title }}</p>
    <p>申请类型: {{ userData.applyTypeShow }}</p>
    <p v-if="userData.applyType===1||userData.applyType===0||userData.applyType===3">开始时间: {{ timestampToTime(userData.startTime) }}</p>
    <p v-if="userData.applyType===1||userData.applyType===0||userData.applyType===3">结束时间: {{ timestampToTime(userData.endTime) }}</p>
    <p v-if="userData.applyType===2||userData.applyType===4">时间: {{ timestampToTime(userData.singleTime) }}</p>
    <p v-if="userData.applyType===6">付款期限: {{ timestampToTime(userData.payEndTime) }}</p>
    <p v-if="userData.applyType===6">申请金额: {{ userData.money }}</p>
    <p v-if="userData.applyType===5">申请部门： {{ userData.sectorName }}</p>
    <p v-if="userData.applyType===5">申请岗位: {{ userData.job }}</p>
    <p>申请原因： {{ userData.content }}</p>
    <p>申请人： {{ userData.sendPeople }}</p>
    <p>审批人： {{ userData.approvePeople }}</p>
    <p>审批时间： {{ userData.staffName }}</p>
    <p>状态: {{ userData.state }}</p>
    <p>审批意见: {{ userData.start }}</p>
  </div>
  <span class="dialog-footer">
    <el-button type="primary" @click="submit">确定</el-button>
    <el-button @click="cancel">取消</el-button>
  </span>
</template>

<style scoped>
.el-form-item .task_person_tips {
  margin-left: 20px;
  color: #999;
}
.text-center {
  text-align: center;
}
.big_table {
  border: 1px solid #999;
  margin-bottom: 40px;
}
.big_table p {
  width: 100%;
  height: 40px;
  text-indent: 2em;
  line-height: 40px;
  border-bottom: 1px solid #999;
}
.big_table .line-one {
  background-color: rgb(212, 210, 210);
  text-align: center;
  font-size: 20px;
  font-weight: bolder;
  text-indent: 0;
}
.big_table .line-last {
  border-bottom: 0;
}
</style>
